package cn.edu.wfit.modules.learn.service.impl.projectmanagement;

import java.util.List;

import cn.edu.wfit.modules.learn.domain.WfitProjectMember;
import cn.edu.wfit.modules.learn.mapper.projectmanagement.WfitProjectMemberMapper;
import cn.edu.wfit.modules.learn.service.projectmanagement.IWfitProjectMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 项目成员Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-25
 */
@Service
public class WfitProjectMemberServiceImpl implements IWfitProjectMemberService
{
    @Autowired
    private WfitProjectMemberMapper wfitProjectMemberMapper;

    /**
     * 查询项目成员
     * 
     * @param id 项目成员主键
     * @return 项目成员
     */
    @Override
    public WfitProjectMember selectWfitProjectMemberById(Long id)
    {
        return wfitProjectMemberMapper.selectWfitProjectMemberById(id);
    }

    /**
     * 查询项目成员列表
     * 
     * @param wfitProjectMember 项目成员
     * @return 项目成员
     */
    @Override
    public List<WfitProjectMember> selectWfitProjectMemberList(WfitProjectMember wfitProjectMember)
    {
        return wfitProjectMemberMapper.selectWfitProjectMemberList(wfitProjectMember);
    }

    /**
     * 新增项目成员
     * 
     * @param wfitProjectMember 项目成员
     * @return 结果
     */
    @Override
    public int insertWfitProjectMember(WfitProjectMember wfitProjectMember)
    {
        return wfitProjectMemberMapper.insertWfitProjectMember(wfitProjectMember);
    }

    /**
     * 修改项目成员
     * 
     * @param wfitProjectMember 项目成员
     * @return 结果
     */
    @Override
    public int updateWfitProjectMember(WfitProjectMember wfitProjectMember)
    {
        return wfitProjectMemberMapper.updateWfitProjectMember(wfitProjectMember);
    }

    /**
     * 批量删除项目成员
     * 
     * @param ids 需要删除的项目成员主键
     * @return 结果
     */
    @Override
    public int deleteWfitProjectMemberByIds(Long[] ids)
    {
        return wfitProjectMemberMapper.deleteWfitProjectMemberByIds(ids);
    }

    /**
     * 删除项目成员信息
     * 
     * @param id 项目成员主键
     * @return 结果
     */
    @Override
    public int deleteWfitProjectMemberById(Long id)
    {
        return wfitProjectMemberMapper.deleteWfitProjectMemberById(id);
    }

    /**
     * 根据成员编号和项目编号查询项目成员
     *
     * @param wfitProjectMember 项目成员
     * @return 项目成员
     */
    @Override
    public boolean selectWfitProjectMemberByMemberNumAndProjectId(WfitProjectMember wfitProjectMember) {
        return wfitProjectMemberMapper.selectWfitProjectMemberByMemberNumAndProjectId(wfitProjectMember);
    }
}
